<?php self::head(); ?>
<script type="text/javascript">
    iCMS.set('Vue.data', {
        type: "<?php echo $result['type']; ?>",
        status: <?php echo (int)$result['status']; ?>,
    });
</script>
<div class="content" id="<?php echo APP_MAINID; ?>">
    <div class="block">
        <div class="block-header block-header-default">
            <h3 class="block-title">基本信息</h3>
        </div>
        <div class="block-content">
            <form action="<?php echo APP_DOURL; ?>" method="POST" id="<?php echo APP_FORMID; ?>" target="iPHP_FRAME">
                <input name="id" type="hidden" value="<?php echo $this->id; ?>" />
                <div class="form-group row">
                    <label class="col-sm-1 col-form-label" for="gid">角色类型</label>
                    <div class="col-sm-8">
                        <select v-model="type" id="type" name="type" class="form-control" data-placeholder="请选择角色类型">
                            <?php echo PropWidget::option(Role::$typeMap, 'type'); ?>
                        </select>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-1 col-form-label" for="name">角 色 名</label>
                    <div class="col-sm-8">
                        <input type="text" name="name" class="form-control" id="name" value="<?php echo $result['name']; ?>" />
                    </div>
                </div>
                <?php AdmincpView::show('widget/credit','apps',$result);?>
                <div class="form-group row">
                    <label class="col-sm-1 col-form-label" for="free">免费</label>
                    <div class="col-sm-8">
                        <input type="text" name="free" class="form-control" id="free" value="<?php echo $result['free']; ?>" />
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-1 col-form-label" for="remark">备注</label>
                    <div class="col-sm-8">
                        <textarea name="remark" id="remark" cols="30" rows="10" class="form-control"><?php echo $result['remark']; ?></textarea>
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-1 col-form-label" for="free">排序</label>
                    <div class="col-sm-8">
                        <input type="text" name="sortnum" class="form-control" id="sortnum" value="<?php echo $result['sortnum']; ?>" />
                    </div>
                </div>
                <div class="form-group row">
                    <label class="col-sm-1 col-form-label" for="status">状态</label>
                    <div class="col-sm-8">
                        <input v-model="status" type="checkbox" data-toggle="switch" name="status" id="status" value="1" />
                    </div>
                </div>
                <?php self::formSubmit(); ?>
            </form>
        </div>
    </div>
</div>
<?php self::foot(); ?>
